<template>
    <div class="main">
        <div class="form-container">
            <div  class="form-main">
                <h2 style="background:#265eff;">疫情上报系统</h2>
                <p class="warn-content">为严防疫情扩散，进一步做好新型冠状病毒的肺炎疫情防控工作，请如实填写以下信息!</p>
                <span class="required" style="color:red">*</span> <label for="name">姓名</label><br/>

                <input class="form-border" id="name" type="text" name="username"  placeholder="姓名" required="required" v-model="nameModel"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">身份证号</label><br/>

                <input class="form-border" id="idNumber" type="text" name="idNumber"  placeholder="请填写身份证号"  v-model="idNumber"  /> <br/>
                <!-- <span class="required" style="color:red">*</span> -->
                 <label for="gender" required>性别</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input  type="radio" name="gender" value="0"   id="male" checked="checked" v-model="genderModel" /><label for="male"> 男</label>&nbsp;&nbsp;
                        <input type="radio" name="gender" value="1" id="female" v-model="genderModel" /><label for="female"> 女</label>
                    </div>
                </div>  
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="age">年龄</label><br/>
                <input class="form-border" id="age" type="text" name="username"  placeholder="年龄" required="required" v-model="ageModel" /> <br/>
                 <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">监护人姓名</label><br/>

                <input class="form-border" id="guardianName" type="text" name="guardianName"  placeholder="请填写监护人姓名"  v-model="guardianName"  /> <br/>
                 <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">监护人身份证号</label><br/>

                <input class="form-border" id="guardianIdNumber" type="text" name="guardianIdNumber"  placeholder="请填写监护人身份证号"  v-model="guardianIdNumber"  /> <br/>
                <!-- 若为女性 -->
                <label for="gender" required>孕妇</label><br/>
               <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input  type="radio" name="a" value="1"   id="male" checked="checked" v-model="pregnant" /><label for="a">是</label>&nbsp;&nbsp;
                        <input type="radio" name="b" value="0" id="female" v-model="pregnant" /><label for="b"> 否</label>
                    </div>
                </div>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">常住地址(区分本地和外地)</label><br/>
                <input class="form-border" id="residence" type="text" name="residence"  placeholder="请填写常住地址" v-model="residence"  /> <br/>
                 <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">市(当前所在地)</label><br/>

                <input class="form-border" id="currentCity" @focus="showPopupPicker=true" type="text" name="currentCity"  placeholder="请填所在市"  v-model="currentCity"  /> <br/>
                  <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">区县(当前所在地)</label><br/>

                <input class="form-border" id="currentCounty" type="text" name="currentCounty"  placeholder="请填写所在区县"  v-model="currentCounty"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">街道/乡/镇(当前所在地)</label><br/>

                <input class="form-border" id="currentCountry" type="text" name="currentCountry"  placeholder="请填所在街道/乡/镇"  v-model="currentCountry"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">社区/村(当前所在地)</label><br/>

                <input class="form-border" id="currentVillage" type="text" name="currentVillage"  placeholder="请填写所在社区/村"  v-model="currentVillage"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">当前所在地(详细住址)</label><br/>

                <input class="form-border" id="currentLocation" type="text" name="currentLocation"  placeholder="请填写当前所在地"  v-model="currentLocation"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">工作单位(没有不填)</label><br/>

                <input class="form-border" id="workOrg" type="text" name="workOrg"  placeholder="请填写工作单位"  v-model="workOrg"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="phone">联系电话</label><br/>
                <input class="form-border" id="phone" type="text" name="phoneNum"  placeholder="请填写联系电话" v-model="phoneModel" /><br/> 

                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="contact">是否去过(路过)武汉【即日起14天内】</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="contact-patient" value="1"   id="toWuhancontactYes" v-model="toWuhan" /><label for="toWuhancontactYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="contact-patient" value="0"   id="toWuhancontactNo" checked="checked" v-model="toWuhan" /><label for="toWuhancontactNo"> 否</label>
                    </div>
                </div>

                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="contact">是否接触过武汉返回人员【即日起14天内】</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="contactWuhanpatient" value="1"   id="contactWuhanYes" v-model="contactWuhan" /><label for="contactWuhanYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="contactWuhanpatient" value="0"   id="contactWuhanNo" checked="checked" v-model="contactWuhan" /><label for="contactWuhanNo"> 否</label>
                    </div>
                </div>

                <!-- <span class="required" style="color:red">*</span> -->
                 <label for="contact">武汉接触史(去过武汉或者接触过武汉人员)</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="wuhanTouchHistorypatient" value="1"   id="wuhanTouchHistoryYes" v-model="wuhanTouchHistory" /><label for="wuhanTouchHistoryYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="wuhanTouchHistorypatient" value="0"   id="wuhanTouchHistoryNo" checked="checked" v-model="wuhanTouchHistory" /><label for="wuhanTouchHistoryNo"> 否</label>
                    </div>
                </div>

                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="contact">是否去过(路过)湖北【即日起前14天内】(不含武汉)</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="toHubeipatient" value="1"   id="toHubeiYes" v-model="toHubei" /><label for="toHubeiYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="toHubeipatient" value="0"   id="toHubeiNo" checked="checked" v-model="toHubei" /><label for="toHubeiNo"> 否</label>
                    </div>
                </div>

                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="contact">是否接触过湖北返回人员(不含武汉)</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="contactHubeipatient" value="1"   id="contactHubeiYes" v-model="contactHubei" /><label for="contactHubeiYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="contactHubeipatient" value="0"   id="contactHubeiNo" checked="checked" v-model="contactHubei" /><label for="contactHubeiNo"> 否</label>
                    </div>
                </div>

                 <!-- <span class="required" style="color:red">*</span>  -->
                 <label for="contact">是否接触史(去过湖北或者接触过湖北人员)(不含武汉)</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="hubeiTouchHistorypatient" value="1"   id="hubeiTouchHistoryYes" v-model="hubeiTouchHistory" /><label for="hubeiTouchHistoryYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="hubeiTouchHistorypatient" value="0"   id="hubeiTouchHistoryNo" checked="checked" v-model="hubeiTouchHistory" /><label for="hubeiTouchHistoryNo"> 否</label>
                    </div>
                </div>

                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="contact">目前健康状况</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="healthCondition" value="1"   id="healthConditionYes" v-model="healthCondition" /><label for="healthConditionYes"> 有症状</label>&nbsp;&nbsp;
                        <input type="radio" name="healthCondition" value="0"   id="healthConditionNo" checked="checked" v-model="healthCondition" /><label for="healthConditionNo">正常</label>
                    </div>
                </div>
                 <label for="symptom">症状</label><br/>
                <div class="form-border tizheng clearfix">
                    <div>
                        <input type="checkbox" name="symptom" value="0" v-model="symptoModel"/> 无
                    </div>
                    <div>
                        <input type="checkbox" name="symptom" value="1" v-model="symptoModel"/> 干咳
                    </div>
                    <div>
                        <input type="checkbox" name="symptom" value="2" v-model="symptoModel"/> 咽痛
                    </div>
                    <div>
                        <input type="checkbox" name="symptom" value="3" v-model="symptoModel"/> 发热
                    </div>
                    <div>
                        <input type="checkbox" name="symptom" value="4" v-model="symptoModel"/> 寒战
                    </div>
                    <div>
                        <input type="checkbox" name="symptom" value="5" v-model="symptoModel"/> 鼻塞
                    </div>
                </div>
                 <label for="name">首次出现症状日期</label><br/>
                <div style="margin-top:5px; width:100%; height: 32px; line-height:32px; border: 1px solid #cccccc; text-align: center; " @click="showTimePlugin">
                   <span class="select_show">{{queryTime}}</span>
                </div><br/>

                 <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">是否有接触过的人被隔离【确诊、疑似】（没有不填）</label><br/>

                <input class="form-border" id="touchPersonIsolation" type="text" name="touchPersonIsolation"  placeholder="选填"  v-model="touchPersonIsolation"  /> <br/>
                 <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">接触人姓名</label><br/>

                <input class="form-border" id="touchPersonName" type="text" name="touchPersonName"  placeholder="请填写接触人姓名"  v-model="touchPersonName"  /> <br/>
                 <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">接触人电话</label><br/>

                <input class="form-border" id="touchPersonPhone" type="text" name="touchPersonPhone"  placeholder="请填写接触人电话"  v-model="touchPersonPhone"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                 <!-- <span class="required" style="color:red">*</span>  -->
                 <label for="contact">接触人的住址或隔离医院【没有不填】</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="touchPersonLocation" value="1"   id="touchPersonLocationYes" v-model="touchPersonLocation" /><label for="touchPersonLocationYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="touchPersonLocation" value="0"   id="touchPersonLocationNo" checked="checked" v-model="touchPersonLocation" /><label for="touchPersonLocationNo"> 否</label>
                    </div>
                </div>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">接触人在武汉的家人数【没有不填，有填写数量】</label><br/>

                <input class="form-border" id="familyCountInWuhan" type="text" name="familyCountInWuhan"  placeholder="请填写在武汉的家人数"  v-model="familyCountInWuhan"  /> <br/>
                <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">在武汉的家人姓名【多个用、分开】</label><br/>

                <input class="form-border" id="familyNameInWuhan" type="text" name="familyNameInWuhan"  placeholder="请填写现住地址" v-model="familyNameInWuhan"  /> <br/>
                
                 <!-- <span class="required" style="color:red">*</span> -->
                 <label for="contact">近期是否医院就诊</label><br/>
                <div class="form-border form-twoBor">
                    <div style="border-bottom: 1px solid rgba(255, 255, 255, 0.24);">
                        <input type="radio" name="goToDoctor" value="1"   id="goToDoctorYes" v-model="goToDoctor" /><label for="goToDoctorYes"> 是</label>&nbsp;&nbsp;
                        <input type="radio" name="goToDoctor" value="0"   id="goToDoctorNo" checked="checked" v-model="goToDoctor" /><label for="goToDoctorNo"> 否</label>
                    </div>
                </div>
                   <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">就诊医院</label><br/>

                <input class="form-border" id="medicalHospital" type="text" name="medicalHospital"  placeholder="请填写就诊医院"  v-model="medicalHospital"  /> <br/>
                   <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">诊断结果</label><br/>

                <input class="form-border" id="medicalResult" type="text" name="medicalResult"  placeholder="请填写诊断结果"  v-model="medicalResult"  /> <br/>
                   <!-- <span class="required" style="color:red">*</span>  -->
                <label for="name">既往病史</label><br/>

                <input class="form-border" id="medicalHistory" type="text" name="medicalHistory"  placeholder="请填写既往病史"  v-model="medicalHistory"  /> <br/>
            </div>
            <button class="form-submit" type="submit" @click="submitClick">提交</button>
        </div>
        <datetime style="display:none;" v-model="queryTime" @on-change="changeTime" :show.sync="timeShow"></datetime>
        <confirm v-model="showconfirm"
             :title="confirmtitle"
             @on-cancel="onCancel"
             @on-confirm="onConfirm"
             @on-show="onShow"
             @on-hide="onHide">
        </confirm>
        <popup-picker :showCell="false" title="测试" :show.sync="showPopupPicker" :data="casList" :columns="3" v-model="casModel" ></popup-picker>
    </div>
</template>
<script>
import { newquestionnaireData , queryCityData} from '@/assets/js/service'
import fromConfig from '../../../static/formConfig'
import { Confirm , Datetime,PopupPicker} from 'vux'

export default {
    components: {
        Confirm,
        Datetime,
        PopupPicker
    },
    data () {
        return {
            casList:[],
            casModel:[],
            showPopupPicker:false,
            nameModel:'',
            genderModel:'',
            ageModel:'',
            phoneModel:'',
            symptoModel:[],
            temperatureModel:'',
            feverModel:'1',
            contactModel:'1',
            showconfirm:false,
            confirmtitle:"是否继续填写",
            // 新增
            queryTime:"开始时间",
            // endTime: '',
            timeShow:false,
            isFlag: true ,
            familyMsgModel:'',
            familyModel:'4',
            familyNum:'',
            departmentModel:'',
            addressModel:'',
            newAddressModel:'',
            personModel:'4',
            startDate: '',
            endDate: '',
            value1: '',
            someone:'',
            personMsgModel:'',
            // 新增
            idNumber:'',
            guardianName: '',//监护人
            guardianIdNumber: '',//监护人ID
            pregnant:'0', //0 否，1 是否为妇女
            residence: '',//常住地
            currentCity: '',//当前所在市
            currentCounty: '',//当前所在区/县
            currentCountry: '',//街道/乡/镇（当前所在地）
            currentVillage: '',//社区/村（当前所在地）
            currentLocation: '',//当前所在地（详细住址)
            workOrg: '', //工作单位
            toWuhan: '', // 是否去过（路过）武汉【即日起前14天内】
            contactWuhan: '', //是否接触过武汉返回人员
            wuhanTouchHistory: '',//武汉接触史（去过武汉或者接触过武汉人员）
            toHubei: '', //
            contactHubei: '',
            hubeiTouchHistory: '',
            healthCondition: '',//目前健康状况（0:正常，1:有症状）
            symptom: '', //'症状（0:无，1:干咳，2:咽痛，3:发热，4:寒战，5:鼻塞）',
            firstSymptomDate: '', //首次出现症状日期
            touchPersonIsolation: '',//是否有接触过的人被隔离【确诊、疑似】（没有不填）',
            touchPersonName: '',//接触人姓名
            touchPersonPhone: '',//
            touchPersonLocation: '',//接触人住址及隔离医院【没有不填】
            familyCountInWuhan: '',//在武汉的家人数
            familyNameInWuhan: '', //在武汉的家人姓名【多个用、分开】
            goToDoctor: '',//近期是否医院就诊(0:否，1:是)
            medicalHospital: '',//就诊医院
            medicalResult: '',//诊断结果
            medicalHistory: '',//既往病史

        }
    },
    created () {
        this.initcascade();
    },
    mounted: function () {
       let personMsg = localStorage.getItem('personMsg');
       this.endTime = this.getCurrentDate();
       console.log(this.endTime);
       console.log(fromConfig)
       console.log(1234)
    },
    watch:{
        personModel(){
            console.log(this.personModel);
            let personMsg = document.getElementById('personMsg');
            if(this.personModel != 4){
              personMsg.style.display = 'block';
            } else {
              personMsg.style.display = 'none';  
            }
        },
        familyModel(){
            console.log(this.familyModel);
            let personMsg = document.getElementById('familyMsgs');
            if(this.familyModel != 4){
              personMsg.style.display = 'block';
            } else {
              personMsg.style.display = 'none';  
            }
        }
    },
    methods: {
        initcascade(){
            let _this=this;
            queryCityData({},function(res){
                console.log("res==>",res)
                _this.casList=[];
                if(typeof(res.data)!="undefined"&&res.data.length>0){
                    res.data.forEach((item,index)=>{
                        let obj={name:item.label,value: item.id, parent: 0 }
                        _this.casList.push(obj);
                        if(item.children){
                            item.children.forEach((itemtwo,indextwo)=>{
                                // if(itemtwo.label=='市辖区'){
                                //     itemtwo.children.forEach((itemthree,indexthree)=>{
                                //         let objthree={name:itemthree.label,value: itemthree.id, parent: item.id }
                                //         //console.log(itemthree)
                                //         _this.casList.push(objthree);
                                //     })
                                // }else{
                                    let objtwo={name:itemtwo.label,value: itemtwo.id, parent: itemtwo.parentId }
                                    _this.casList.push(objtwo);
                                    if(objtwo.children){
                                        objtwo.children.forEach((itemf,indexf)=>{
                                            let objthree={name:itemf.label,value: itemf.id, parent: itemf.parentId }
                                            _this.casList.push(objthree);
                                        })
                                    }
                                //}
                                //console.log(itemtwo)
                            })
                        }
                        
                        //console.log(item);
                    })
                    //_this.caseListarray(res.data);
                    console.log(JSON.stringify(_this.casList))
                }
            })
        },
        caseListarray(datas){ //遍历树  获取id数组
            for(var i in datas){
                let obj={"name":datas[i].label,"value":datas[i].id,"parentId":datas[i].parentId=="000000"?0:datas[i].parentId}
                this.casList.push(obj);
                if(datas[i].children){
                    this.caseListarray(datas[i].children);
                }
            }
        },
        showTimePlugin(){
            this.timeShow=true;
            
        },
        changeTime(){
            console.log("change time")
            const cqueryTime=Date.parse(this.queryTime);
            const cendTime=Date.parse(this.endTime);
            // if(cqueryTime > cendTime){
            //     this.queryTime = "开始时间";
            //     window.vm.$vux.toast.text('请重新填写开始时间', 'bottom')
            // }
        },
        getCurrentDate(){
              const timeStr = '-';
              const curDate = new Date();
              const curYear =curDate.getFullYear();  //获取完整的年份(4位,1970-????)
              const curMonth = curDate.getMonth()+1;  //获取当前月份(0-11,0代表1月)
              const curDay = curDate.getDate();       //获取当前日(1-31)
              const curWeekDay = curDate.getDay();    //获取当前星期X(0-6,0代表星期天)
              const curHour = curDate.getHours();      //获取当前小时数(0-23)
              const curMinute = curDate.getMinutes();   // 获取当前分钟数(0-59)
              const curSec =curDate.getSeconds();      //获取当前秒数(0-59)
              const Current= curYear+timeStr+curMonth+timeStr+curDay ;
              return Current;
        },
        getUrlParam(name){
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)
                return  unescape(r[2]);
            return null;
        },
        onCancel(){
            this.$router.push({path:"/home",query: {}});
        },
        onConfirm(){
            console.log("确认删除")
        },
        onShow(){
            console.log("显示")
        },
        onHide(){
            console.log("隐藏")
        },
        typeTime(val){
            const d = new Date(val);
            const resDate = d.getFullYear() + '-' + this.p((d.getMonth() + 1)) + '-' + this.p(d.getDate());
            return resDate;
        },
        p(s) {
            return s < 10 ? '0' + s : s
        },
        submitClick(){
            let _this = this;
            // &&_this.$verification(this.ageModel,0,"年龄")&&_this.$verification(this.phoneModel,0,"电话")&&_this.$verification(this.phoneModel,1,"电话")&&_this.$verification(this.temperatureModel,0,"体温")
            // if(_this.$verification(this.nameModel,0,"姓名")){
                    var param={
                        "name":this.nameModel,
                        "sex":this.genderModel,
                        "age":this.ageModel,
                        "phone":this.phoneModel,
                        // "symptom":this.symptoModel.join(','),
                        // "temp":this.temperatureModel,
                        // "longitude":"35.212234567",
                        // "latitude":"160.34234567",
                        // "isPatient":this.feverModel,
                        // "isContact":this.contactModel,
                        // 新增
                        // "department": this.departmentModel ,
                        // "perAddress": this.addressModel,
                        // 新增
                        "idNumber": this.idNumber,
                        "guardianName": this.guardianName,//监护人
                        "guardianIdNumber": this.guardianIdNumber,//监护人ID
                        "pregnant": this.pregnant, //0 否，1 是否为妇女
                        "residence": this.residence,//常住地
                        "currentCity": this.currentCity,//当前所在市
                        "currentCounty": this.currentCounty,//当前所在区/县
                        "currentCountry": this.currentCountry,//街道/乡/镇（当前所在地）
                        "currentVillage": this.currentVillage,//社区/村（当前所在地）
                        "currentLocation": this.currentLocation,//当前所在地（详细住址)
                        "workOrg": this.workOrg, //工作单位
                        "toWuhan": this.toWuhan, // 是否去过（路过）武汉【即日起前14天内】
                        "contactWuhan": this.contactWuhan, //是否接触过武汉返回人员
                        "wuhanTouchHistory": this.wuhanTouchHistory,//武汉接触史（去过武汉或者接触过武汉人员）
                        "toHubei": this.toHubei, //
                        "contactHubei": this.contactHubei,
                        "hubeiTouchHistory": this.hubeiTouchHistory,
                        "healthCondition": this.healthCondition,//目前健康状况（0:正常，1:有症状）
                        "symptom": this.symptomModel, //'症状（0:无，1:干咳，2:咽痛，3:发热，4:寒战，5:鼻塞）',
                        "firstSymptomDate": this.firstSymptomDate, //首次出现症状日期
                        "touchPersonIsolation": this.touchPersonIsolation,//是否有接触过的人被隔离【确诊、疑似】（没有不填）',
                        "touchPersonName": this.touchPersonName,//接触人姓名
                        "touchPersonPhone": this.touchPersonPhone,//
                        "touchPersonLocation": this.touchPersonLocation,//接触人住址及隔离医院【没有不填】
                        "familyCountInWuhan": this.familyCountInWuhan,//在武汉的家人数
                        "familyNameInWuhan": this.familyNameInWuhan, //在武汉的家人姓名【多个用、分开】
                        "goToDoctor": this.goToDoctor,//近期是否医院就诊(0:否，1:是)
                        "medicalHospital": this.medicalHospital,//就诊医院
                        "medicalResult": this.medicalResult,//诊断结果
                        "medicalHistory": this.medicalHistory,//
                        // "curAddress": this.newAddressModel,
                        // "isolationTime": this.queryTime ,//居家隔离时间
                        // "myCondition": this.personModel ,//本人状况类型
                        // "familyStatus": this.familyModel ,
                        // "familyNumber": this.familyNum ,
                        // "familyStatusDescribe":this.familyMsgModel ,
                        // "myConditionDescribe":this.personMsgModel ,
                        // 
                    };
                    console.log(param)
                    localStorage.setItem('personMsg', param)
                    // return;
                    newquestionnaireData(param,function(res){
                        console.log("返回正常questionnaireData",res)
                        if(res.success){
                            console.log("ddd"+res)
                             _this.$showBottomToast("上报成功")
                            //_this.showconfirm=true;
                        }else{
                            _this.$showBottomToast("请求数据异常！")
                        }
                    })
            // }
            
            console.log(this.nameModel+'+'+this.genderModel+'+'+this.ageModel+'+'+this.phoneModel+'+'+this.symptoModel
            +'+'+this.temperatureModel+'+'+this.feverModel+'+'+this.contactModel)
        }
    }
}
</script>
<style lang="less" scoped>
.main{
    overflow: hidden;
    // background: url("../../assets/images/home/bj.png") 0 0;
    background-size: 100% 100%;
    .form-container{
        // background: url("../../assets/images/home/cont_bj.png") 0 0;
        background-size: 100% 100%;
        width: 100%;
        // margin: 0 3%;
        // padding: 0 6px;
        margin-bottom: 10px;
        padding-bottom: 25px;
        .form-main{
            width: 100%;
            // margin-top: 130px;
            margin-bottom: 30px;
            padding: 0 20px;
            color: #333333;
            .warn-content{
                margin-top: 10px;
                margin-bottom: 18px;
                line-height: 30px;
                font-size: 15px;
            }
            h2{
                text-align: center;
                color: #fff;
                width: calc(100% + 40px);
                margin-left: -20px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.24);
                height: 60px;
                line-height: 60px;
                font-size: 24px;
            }
            h4{
                margin-top: 15px;
            }
            .form-border{
                background-color: rgba(255, 255, 255, 0.9);
                color: #333333;
                padding:5px;
                margin: 5px 0;
                width: 100%;
                margin-bottom: 20px;
                border-radius: 3px;
            }
            .tizheng{
                div{
                    width: 33.3333%;
                    float: left;
                    padding: 10px 5px;
                    font-size: 15px;
                    input{
                        vertical-align: middle;
                        width: 15px;
                        height: 15px;
                    }
                }
            }
            .form-twoBor{
                padding: 5px 0;
                div{
                    width: 100%;
                    padding: 5px 10px;
                    input{
                        vertical-align: middle;
                        width: 20px;
                        height: 20px;
                    }
                    label{
                        font-size: 15px;
                    }
                }

            }
            
        }
        .form-submit{
            width: 90%;
            margin-left: 5%;
            height: 50px;
            background: #228ed9;
            border-radius: 8px;
            color: white;
            font-size: 15px;
            border: none;
            outline: none;
        }
    }
input{
    border: 1px solid #cccccc;
}
.yy-input::-webkit-input-placeholder,
  textarea::-webkit-input-placeholder {
    /* WebKit browsers */
    color: red;
  }
    
}
</style>